package io.renren.redis;

import io.renren.RenrenApplication;
import io.renren.common.utils.RedisUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.HashMap;

/**
 * @author: xiaomi
 * @date: 2022/1/28
 * @description:
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = RenrenApplication.class)
public class HashOps {

    @Autowired
    RedisUtils redisUtils;

    @Test
    public void hMSet() {
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("张三", "你好");
        redisUtils.hMSet("hash::test", hashMap);
    }
}
